package com.complex.spring.advance.service.event;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
	public static void main(String[] args) {
		//可以使用new String[]加载一组配置文件,甚至是通配符
		//ApplicationContext context = new ClassPathXmlApplicationContext(new String[]{"bean/spring-service.xml","bean/spring-annotation.xml"});
		ApplicationContext context = new ClassPathXmlApplicationContext("bean/spring-*.xml");
		MethodExecutionEventPublisher publisher = (MethodExecutionEventPublisher)context.getBean("evtPublisher");
		publisher.methodToMonitor();
	}
}
